/*
 Navicat Premium Data Transfer

 Source Server         : local-mysql
 Source Server Type    : MySQL
 Source Server Version : 50731
 Source Host           : localhost:3306
 Source Schema         : end_of_term

 Target Server Type    : MySQL
 Target Server Version : 50731
 File Encoding         : 65001

 Date: 07/12/2020 23:57:20
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for domitory
-- ----------------------------
DROP TABLE IF EXISTS `domitory`;
CREATE TABLE `domitory` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `several_people` int(11) DEFAULT NULL,
  `surplus_power` double DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of domitory
-- ----------------------------
BEGIN;
INSERT INTO `domitory` VALUES (1, '竹枫1舍-105', 4, 68.5);
INSERT INTO `domitory` VALUES (2, '竹枫1舍-109', 4, 132);
INSERT INTO `domitory` VALUES (3, '竹枫1舍-303', 4, 126);
COMMIT;

-- ----------------------------
-- Table structure for express_delivery
-- ----------------------------
DROP TABLE IF EXISTS `express_delivery`;
CREATE TABLE `express_delivery` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `addressee` varchar(255) DEFAULT NULL,
  `input_time` datetime DEFAULT NULL,
  `order_number` varchar(255) DEFAULT NULL,
  `pick_up_code` varchar(255) DEFAULT NULL,
  `pick_up_name` varchar(255) DEFAULT NULL,
  `pick_up_time` datetime DEFAULT NULL,
  `whether_pick_up` int(11) DEFAULT NULL,
  `domitory_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKccpjto7l6ei8kce645lln43kh` (`domitory_id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of express_delivery
-- ----------------------------
BEGIN;
INSERT INTO `express_delivery` VALUES (1, '张三', '2020-12-07 09:21:45', '634743842934374862', '43-8-36', NULL, NULL, 0, 1);
INSERT INTO `express_delivery` VALUES (2, '阿巴阿巴', '2020-12-07 09:28:04', '634743842934374483', '10-2-45', NULL, NULL, 0, 2);
INSERT INTO `express_delivery` VALUES (3, '哈萨克', '2020-12-07 09:28:59', '837643842934378361', '1-2-7765', NULL, NULL, 0, 3);
COMMIT;

-- ----------------------------
-- Table structure for menu
-- ----------------------------
DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `json` longtext,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of menu
-- ----------------------------
BEGIN;
INSERT INTO `menu` VALUES (1, '{\n  \"homeInfo\": {\n    \"title\": \"首页\",\n    \"href\": \"page/welcome\"\n  },\n  \"logoInfo\": {\n    \"title\": \"宿舍管理系统\",\n    \"image\": \"images/logo.png\",\n    \"href\": \"\"\n  },\n  \"menuInfo\": [\n    {\n      \"title\": \"常规管理\",\n      \"icon\": \"fa fa-address-book\",\n      \"href\": \"\",\n      \"target\": \"_self\",\n      \"child\": [\n        {\n          \"title\": \"主页\",\n          \"href\": \"page/welcome\",\n          \"icon\": \"fa fa-home\",\n          \"target\": \"_self\"\n        },\n        {\n          \"title\": \"宿舍管理\",\n          \"href\": \"page/domitory-view\",\n          \"icon\": \"fa fa-window-maximize\",\n          \"target\": \"_self\"\n        },\n        {\n          \"title\": \"用电管理\",\n          \"href\": \"\",\n          \"icon\": \"fa fa-gears\",\n          \"target\": \"_self\",\n          \"child\": [\n            {\n              \"title\": \"用电详情\",\n              \"href\": \"page/powerRecord-view\",\n              \"icon\": \"fa fa-list-alt\",\n              \"target\": \"_self\"\n            },\n            {\n              \"title\": \"电费充值\",\n              \"href\": \"page/powerRecharge-view\",\n              \"icon\": \"fa fa-navicon\",\n              \"target\": \"_self\"\n            }\n          ]},\n        {\n          \"title\": \"快递管理\",\n          \"href\": \"page/expressDelivery-view\",\n          \"icon\": \"fa fa-window-maximize\",\n          \"target\": \"_self\"\n        },\n        {\n          \"title\": \"学生管理\",\n          \"href\": \"page/student-view\",\n          \"icon\": \"fa fa-window-maximize\",\n          \"target\": \"_self\"\n        }\n      ]\n    }\n  ]\n}', '管理员');
INSERT INTO `menu` VALUES (2, '{\n  \"homeInfo\": {\n    \"title\": \"首页\",\n    \"href\": \"page/welcome\"\n  },\n  \"logoInfo\": {\n    \"title\": \"宿舍管理系统\",\n    \"image\": \"images/logo.png\",\n    \"href\": \"\"\n  },\n  \"menuInfo\": [\n    {\n      \"title\": \"查询 \",\n      \"icon\": \"fa fa-address-book\",\n      \"href\": \"\",\n      \"target\": \"_self\",\n      \"child\": [\n        {\n          \"title\": \"主页\",\n          \"href\": \"page/welcome\",\n          \"icon\": \"fa fa-home\",\n          \"target\": \"_self\"\n        },\n        {\n          \"title\": \"用电详情\",\n          \"href\": \"page/powerRecord-view\",\n          \"icon\": \"fa fa-window-maximize\",\n          \"target\": \"_self\"\n        },\n        {\n          \"title\": \"快递管理\",\n          \"href\": \"page/expressDelivery-view\",\n          \"icon\": \"fa fa-window-maximize\",\n          \"target\": \"_self\"\n        }\n      ]\n    },\n    {\n      \"title\": \"操作\",\n      \"icon\": \"fa fa-address-book\",\n      \"href\": \"\",\n      \"target\": \"_self\",\n      \"child\": [\n        {\n          \"title\": \"主页\",\n          \"href\": \"\",\n          \"icon\": \"fa fa-home\",\n          \"target\": \"_self\"\n        },\n        {\n          \"title\": \"电费充值\",\n          \"href\": \"page/powerRecharge-view\",\n          \"icon\": \"fa fa-window-maximize\",\n          \"target\": \"_self\"\n        }\n      ]\n    }\n  ]\n}', '学生');
COMMIT;

-- ----------------------------
-- Table structure for power_record
-- ----------------------------
DROP TABLE IF EXISTS `power_record`;
CREATE TABLE `power_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `opera` varchar(255) DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  `use_power` double DEFAULT NULL,
  `domitory_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKj3r90h00gxvimss4j7ackp1m9` (`domitory_id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of power_record
-- ----------------------------
BEGIN;
INSERT INTO `power_record` VALUES (1, '充值', '2020-12-07 09:14:09', 21, 1);
INSERT INTO `power_record` VALUES (2, '充值', '2020-12-07 09:15:19', 13, 1);
INSERT INTO `power_record` VALUES (3, '充值', '2020-12-07 09:20:53', 32, 2);
INSERT INTO `power_record` VALUES (4, '充值', '2020-12-07 09:21:20', 26, 3);
COMMIT;

-- ----------------------------
-- Table structure for student
-- ----------------------------
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
  `department` varchar(255) DEFAULT NULL,
  `major_clazz` varchar(255) DEFAULT NULL,
  `id` int(11) NOT NULL,
  `domitory_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKdsf85wlb6jknpy2k1dj79vw89` (`domitory_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of student
-- ----------------------------
BEGIN;
INSERT INTO `student` VALUES ('信息工程学院', '软件工程1807', 1, 1);
INSERT INTO `student` VALUES ('信息工程学院', '软件工程1807', 2, 2);
INSERT INTO `student` VALUES ('信息工程学院', '软件工程1807', 3, 3);
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(50) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES (1, 'ROLE_STUDENT', '学生');
INSERT INTO `sys_role` VALUES (2, 'ROLE_ADMIN', '管理员');
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(50) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `username` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_ahtq5ew3v0kt1n7hf1sgp7p8l` (`email`),
  UNIQUE KEY `UK_51bvuyvihefoh4kp5syh2jpi4` (`username`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES (1, '20200001@mail.whxy.edu.cn', '荆轲', '$2a$10$WejBErReFkh3r2zqNEPLGeRyju1awNqe8Q9JjPdBEdSnbOvnFZaKm', '13672896473', '20200001');
INSERT INTO `sys_user` VALUES (2, '20200002@mail.whxy.edu.cn', '秦始皇', '$2a$10$qvUw2C9f27JDc7scdkm3k.jz5RVnd14byjE9RtPhwKU0WutLA9kYe', '16689735672', '20200002');
INSERT INTO `sys_user` VALUES (3, '20200003@mail.whxy.edu.cn', '熏悟空', '$2a$10$kC6Zyg6d/nUW9FJgzCTUIOnhqPK0K87VoMAszdf8UtdpsvfoTMN4a', '18362829632', '20200003');
INSERT INTO `sys_user` VALUES (4, 'admin@mail.whxy.edu.cn', '居八戒', '$2a$10$7alFh46LWbIDu78J8V0KTuzZsaHAg6aJM6Xmws6aiSlcmL4Vbyahu', '15278359674', 'admin');
COMMIT;

-- ----------------------------
-- Table structure for sys_user_sys_role_list
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_sys_role_list`;
CREATE TABLE `sys_user_sys_role_list` (
  `sys_user_list_id` int(11) NOT NULL,
  `sys_role_list_id` int(11) NOT NULL,
  KEY `FKr5uu2wp8rbmt191q2r7uknv5w` (`sys_role_list_id`),
  KEY `FK98f1panarosvjgov9og25g3ln` (`sys_user_list_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_user_sys_role_list
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_sys_role_list` VALUES (1, 1);
INSERT INTO `sys_user_sys_role_list` VALUES (2, 1);
INSERT INTO `sys_user_sys_role_list` VALUES (3, 1);
INSERT INTO `sys_user_sys_role_list` VALUES (4, 2);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
